<?php
class Pageley_Tag_Parameter extends Pageley_Tag_Abstract {
    private $name;
    private $value;
    
    public function execute() {
        $parentTag = $this->getParentTag();
        if($parentTag === null || !($parentTag instanceof Pageley_Tag_Parametrizable)) {
            throw new Pageley_Tag_Exception("This tag must be nested inside a parametrizable tag.");
        }
        $parentTag->setParameter($this->name, $this->value);
        return "";
    }
    
    public function setName($name) {
        $this->name = $name;
    }
    
    public function setValue($value) {
        $this->value = $value;
    }

}